// describe("A suite of basic functions", function() {
//     it("reverse word",function(){
//         expect("DCBA").toEqual(reverse("ABCD"));
//         //expect("Conan").toEqual(reverse("nano"));
        
//     });
// });

describe("cachepool", function() {
    function Person(name,age){
        this.name=name;
        this.age=age;
    }
    var p=new Person('wzg',18);


    it("add something",function(){
        expect(cachePoolHelper.add("wzg",p)).toBe(undefined);
     
    });


    it("get something",function(){
        expect(cachePoolHelper.get("wzg")).toBe(p);
     
    });

    it("add something with limitation",function(){
        expect(cachePoolHelper.add("2016-8-17",p,1000*60*1)).toBe(undefined);
     
    });
    it("get something with limitation",function(){
        expect(cachePoolHelper.get("2016-8-17")).toBe(p);
     
    });
    it("set a global limitation",function(){
        expect(cachePoolHelper.setLimitation(1000*60*2,true));
     
    });
});